﻿@*@model IEnumerable<Century.Model.CMS.SitePage>*@
@{
    int i = 1;
    string cssclass = string.Empty;
    List<Century.Model.CMS.SitePage> subPages = Html.GetSubPages();
}
<div class="sideNav">
    <ul>
        @foreach (var item in subPages)
        {
            if (i == 1 && ((item.Id == Html.CurrentPage().Id) || (item.Id == Html.CurrentPage().ParentId)))
            {
                cssclass = "noMar-top selectedSideNav";
            }
            else if (i == 1)
            {
                cssclass = "noMar-top";
            }
            else if (item.Id == Html.CurrentPage().Id || (item.Id == Html.CurrentPage().ParentId))
            {
                cssclass = "selectedSideNav";
            }
            else
            {
                cssclass = string.Empty;
            }
            <li class="@cssclass"><a href="@item.LocalName"><span>@item.Title</span>
                <div class="sideNavBgFixDiv">
                </div>
            </a></li>
            i++;
        }
    </ul>
</div>
